var TLSSigAPIv2 = require('tls-sig-api-v2');

const fs=require('fs-extra');


async function test(){
    let key=await fs.readFile('./private_key.txt','utf-8');
    let appid=1400238806;
    // var api = new TLSSigAPIv2.Api(1400000000, "5bd2850fff3ecb11d7c805251c51ee463a25727bddc2385f3fa8bfee1bb93b5e");
    var api = new TLSSigAPIv2.Api(appid, key);
    var sig = api.genSig("xiaojun", 86400*180);
    console.log(sig);  
}


test();